package cn.lf.controller;

import cn.lf.dto.index.IndexHeadInfoRepDTO;
import cn.lf.dto.index.IndexHeadInfoReqDTO;
import cn.lf.service.IndexService;
import cn.lf.utils.ResponseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guoyy
 */
@RestController
@RequestMapping("/index")
@Api(tags = "首页统计")
public class IndexController {

    @Autowired
    private IndexService indexService;

    @GetMapping("/getHeadInfo")
    @ApiOperation("获取头部数量统计")
    public ResponseModel<IndexHeadInfoRepDTO> getHeadInfo(IndexHeadInfoReqDTO indexHeadInfoReqDTO){

        IndexHeadInfoRepDTO result = indexService.getHeadInfo(indexHeadInfoReqDTO);

        return ResponseModel.buildSuccessResult(result);
    }

}
